from enum import Enum, unique

@unique
class ErrorCode(Enum):
    success = 0
    auth_error = 1001
    expired_error = 1002
    missing_parameter = 1003
    format_error = 1004
    permission_error = 1005
    parameter_error = 1006
    comon_error = -1
    tcent_error = -2

@unique
class ErrorMsg(Enum):
    no_data = '数据不存在'

class trans():
    teacher_identity = dict([('1',"S"), ('2',"C")])
    teacher_identity_zh = dict([("教学秘书","S"), ("任课教师","C")])
    status = dict([('1',"N"), ('2',"L"), ('3',"C")])
    status_zh = dict([("已启用", "N"), ("已封停", "L"), ("已注销", "C")])
    sex = dict([('1',"M"), ('2',"F")])
    sex_zh = dict([("男", "M"), ("女","F")])
    class_status = dict([('1',"N"), ('2',"C")])
    class_status_zh = dict([("在读","N"), ("离校","C")])
    student_class_action = dict([('1',"add"), ('2',"remove")])
    chapter_action = dict([('1',"add"), ('2',"remove"), ('3',"edit")])
    course_type = dict([('1',"E"), ('2',"P")])
    course_type_zh = dict([("专业课","P"), ("公开课","E")])
    course_status_zh = dict([("上架","N"), ("下架","C")])
    school_status_zh = dict([("可用","N"), ("不可用","C")])
    is_open = dict([('1',"T"), ('2',"F")])
    image_type = dict([('1',"I"), ('2',"V"), ('3',"D")])
    option_tag = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T"]
    choice_ques_type = dict([('单选题', 'MC'), ('多项选择题', 'MA'), ('判断题', 'TF')])
    blank_ques_type = dict([('填空题', 'BL'), ('简答题', 'SA')])
    ques_judge_type = dict([('人工判题', 'M'), ('精确匹配', 'E'), ('关键词匹配', 'E')])
    
